/* control-toolbar 工具栏部件 start */
$control-toolbar: (
  item-margin: 0 getCssVar(spacing, extra-tight),
  item-padding: getCssVar(spacing, tight) getCssVar(spacing, base),
  icon-margin: 0 getCssVar(spacing, extra-tight) 0 0,
  icon-max-width: getCssVar(width-icon, medium),
  icon-max-height: getCssVar(width-icon, medium),
  separator-color: getCssVar(color, fill, 2),
);

/* control-toolbar 视图工具栏 end */

@include b(control-toolbar) {
  @include set-component-css-var(control-toolbar, $control-toolbar);

  display: flex;

  @include e(item) {
    display: flex;
    align-items: center;
    margin: getCssVar(control-toolbar, item-margin);

    .el-button {
      @include flex(row, center, center);

      padding: getCssVar(control-toolbar, item-padding);

      > span {
        @include flex(row, center, center);

        font-size: 14px;
        pointer-events: none; // 禁用点击事件，保证event.target是button元素
      }

      img,
      i {
        display: inline-block;
        max-width: getCssVar(control-toolbar, icon-max-width);
        max-height: getCssVar(control-toolbar, icon-max-height);
        margin: getCssVar(control-toolbar, icon-margin);
      }

    }
  }

  @include e(item-separator) {
    @include no-repeat;

    color: getCssVar(control-toolbar, separator-color);
  }
}
